<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>我的首页</title>
  <script src="/javascripts/jquery-3.1.1.js"></script>
  <script src="/javascripts/angular.js"></script>
  <script src="/plugin/bootstrap/js/bootstrap.js"></script>
  <link rel="stylesheet" href="/plugin/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header>
  <nav class="navbar navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a style="font-size: 25px" class="navbar-brand" href="#">开心日记</a>
      </div>
      <div id="navbar" class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
          <li class="active"><a href="/">首页</a></li>
          <li><a href="/tags">发现</a></li>
          <% if (user) { %>
          <li><a href="/post">写日记</a></li>
          <!--<li><a href="/upload">发现</a></li>-->
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="/logout">退出</a></li>
        </ul>
          <% } else { %>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="/login">登录</a></li>
          <li><a href="/reg">注册</a></li>
        </ul>
        <% } %>
      </div>
    </div>
  </nav>
</header>
<article>
  <% if (success) { %>
  <div id="chenggong"><%= success %></div>
  <% } %>
  <% if (error) { %>
  <div id="shibai"><%= error %></div>
<% } %>